<?php

//include "CF_ParamReciever.php";
include_once "boot.php";

$ar_test = array('one'=>'first','two'=>'second','three'=>'thrid','four'=>'fourth');
$ar_spec = array('one','two','four');

print  CF_ParamReciever::CheckArrayComplete($ar_test,$ar_spec);
print_r($ar_test);
print '<br />';
 CF_ParamReciever::FilterByList($ar_test,$ar_spec);
print_r($ar_test);
unset($ar_test['one']);
print_r($ar_test);
print  CF_ParamReciever::CheckArrayComplete($ar_test,$ar_spec);
//print_r($proc->fieldspec);
//$proc->ProcessFieldSpec();
//print_r($proc->col_list);
//print_r($proc->key_list);


print "<br /> Test: GetReqParamsByList($list,$prefix = '',$requireall = false) <br />/test_CF_ParamReciever.php?mmone=FirstOne&mmtwo=SecondOne&mmthree=ThrdOne&mmfour=FourthOne<br />";
$newvalues = CF_ParamReciever::GetReqParamsByList($ar_spec,'mm',false);
print_r($newvalues);

print "<br /> Test: GetReqParamsAll() <br />/test_CF_ParamReciever.php?mmone=FirstOne&mmtwo=SecondOne&mmthree=ThrdOne&mmfour=FourthOne<br />";
$newvalues = CF_ParamReciever::GetReqParamsAll();
print_r($newvalues);

print "<br /> Test: GetReqParamsAll('get') <br />/test_CF_ParamReciever.php?mmone=FirstOne&mmtwo=SecondOne&mmthree=ThrdOne&mmfour=FourthOne<br />";
$newvalues = CF_ParamReciever::GetReqParamsAll('get');
print_r($newvalues);

print "<br /> Test: GetPackedParamValues($VarParam, $ValParam, $prefix = '', $limit=false)) <br />test_CF_ParamReciever.php?cols=one,two,three,four&stuff=firstthing,secondthing,thirdthing,fourththing<br />";
//$newvalues = $proc->GetPackedParamValues('cols','stuff');
$newvalues = CF_ParamReciever::GetReqParamsPacked( 'cols','stuff', ',',true);
print_r($newvalues);

print "<br /> Test: GetPackedParamSets($VarParam, $ValParam, $prefix = '', $limit=false)) <br />test_CF_ParamReciever.php?mode=Save&cols=one,two,three,four&stuff=firstthing,secondthing,thirdthing,fourththing;1,2,3,4;uno,dos,tres,cuatro<br />";
$newvalues =  CF_ParamReciever::GetPackedParamSets('cols','stuff', ',',';',true);
print_r($newvalues);


print "<br /> Test: GetSingleValue(\$varParam = 'var',\$valParam = 'value')) <br />test_CF_ParamReciever.php?mode=Save&cols=one,two,three,four&stuff=firstthing,secondthing,thirdthing,fourththing;1,2,3,4;uno,dos,tres,cuatro<br />";
$newvalues =  CF_ParamReciever::GetSingleValue('cols','stuff');
print_r($newvalues);


//http://localhost/system3/lib/createfastlib/CF_Classes/test_CF_ParamReciever.php?mmone=FirstOne&mmtwo=SecondOne&mmthree=ThrdOne&mmfour=FourthOne&cols=one,two,three,four&stuff=firstthing,secondthing,thirdthing,fourththing;1,2,3,4;uno,dos,tres,cuatro

?>